<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh">
<head>
<jsp:include page="/commonPages/admin-meta.jsp" flush="true" />
<!-- CSS files -->
<jsp:include page="/commonPages/admin-style.jsp" flush="true" />
<style type="text/css">
#map {
	position: relative;
	height: 520px;
	border: 1px solid #3473b7;
}

#toolbar {
	position: relative;
	height: 33px;
	padding-top: 5;
}
</style>

<script src='js/printMap.js'></script>
<script src='js/MapToImg.js'></script>
<script src='./libs/SuperMap.Include.js'></script>
<script type="text/javascript">
        var map4;
    	var url1 = "http://222.25.188.1:50118/iserver/services/map-YC/rest/maps/县城总规土规差异对比@超图数据";
    	
        function init() {
    		map4 = new SuperMap.Map("map", {
    			controls : [ new SuperMap.Control.Navigation({
    				dragPanOptions : {
    					enableKinetic : true
    				}
    			}) ]
    		});
    	  	
    		layerWorld1 = new SuperMap.Layer.TiledDynamicRESTLayer("World", url1); //获取图层服务地址
    		layerWorld1.events.on({
    			"layerInitialized" : addLayer1
    		});      		
   	}
	//添加地图图层、鹰眼控件到map
	function addLayer1() {
		map4.addLayers([ layerWorld1 ]);		
		map4.setCenter(new SuperMap.LonLat(37426892.09 , 4083177.09), 1);

	}	
	
	function createPrintMap1(id){
		createPrintMap(id);
	}
	
	function mapToImg1(){
		MapToImg&&MapToImg.excute(map4);
		}
	function printMap1(){
		printMap&&printMap.excute(map4);
	}
	
	</script>
</head>
<body onload="init()">
	
	<div id="wrapper">

		<!-- Navigation -->
		<jsp:include page="/commonPages/admin-navigator.jsp" flush="true" />

	</div>
	<div id="page-wrapper">
		<div id="toolbar">
			<div>
				<input type="button" class="btn" value="截图" onclick="mapToImg1()" />
				<input type="button" class="btn" value="打印" onclick="printMap1()" />
			</div>
		</div>
		<div id="map"></div>

	</div>
	<!-- JS files -->
	<jsp:include page="/commonPages/admin-script.jsp" flush="true" />
</body>
</html>